package com.serverTechnology.resource.controller;

import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;

import javax.annotation.Resource;

import com.serverTechnology.resource.entity.DispositionEntity;
import com.serverTechnology.resource.entity.dto.DispositionAddDto;
import com.serverTechnology.resource.entity.dto.DispositionUpdateDto;
import com.serverTechnology.resource.entity.vo.DispositionVo;
import com.serverTechnology.resource.entity.vo.InsertFidAndNameVo;
import com.serverTechnology.resource.entity.vo.ParamInsertFidVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import com.serverTechnology.resource.service.IDispositionService;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * 配置参数表 接口
 *
 * @author 王烁
 * @since 2024-07-28
 */
@Api(tags = "配置参数表的接口")
@RestController
@RequestMapping("/disposition")
@ApiResource(name = "配置参数表的接口")
public class DispositionController {

    @Resource(name = "DispositionServiceImpl")
    private IDispositionService iDispositionService;

    /**
     * 查询配置参数表所属id
     * @param deviceId
     * @return
     */
    @ApiOperation(value = "查询-所属父id")
    @GetMapping("/fid")
    public ResponseData<List<ParamInsertFidVo>> page(Long deviceId) {
        List<ParamInsertFidVo> fidAndNameVo= iDispositionService.findPage(deviceId);
        return new SuccessResponseData<>(fidAndNameVo);
    }


}
